Computing devices often utilize runtime systems to create abstractions of data that are accessible by various processing units or functionalities, such as central processing units (CPUs), digital signal processors (DSPs), graphical processing units (GPUs), camera pipelines, etc. Some runtime systems can identify and manage access to data for an application that is stored in various memory units of a computing device. In particular, some runtime systems may manage the application data and provide an abstract representation, such as a “buffer” to abstract over array data. Buffer data may reside on various types of memory units accessible by various processing units of a computing device. Buffer data may be accessed via a programmatic buffer handle that may be used by application code executing on the various processing units. In response to buffer access requests (e.g., using programmatic buffer handle), runtime systems can move buffer data to memory units associated with requesting processing units.
Due to the different capabilities and structures of the various processing units of a computing device, such runtime systems often make the data of buffers available via different manners for different processing units. In particular, copies of buffer data may be individually stored and formatted as “backing stores” on suitable memory units accessible by particular processing units. For example, a backing store may be an allocated block of main memory for a CPU, a specialized driver-managed data store generated using OpenCL drivers for a GPU, an allocated block on a specialized region of main memory (such as ION memory on Advanced RISC Machines (ARM) architectures) for a DSP or a camera pipeline, and/or internal registers and local memory banks for a custom accelerator.
Some runtime systems internally allocate and synchronize various backing stores across processing units. Additionally, for some processing units, such runtime systems may provide abstract programmatic mechanisms by which application code executing on a processing unit may be able to read and write the buffer data. In such cases, the application code may access the buffer data contents (e.g., via a runtime system) without knowledge of which backing stores currently hold the buffer data. Some runtime systems may hide the layout of buffer data within a backing store from application code. Such abstract interfaces for data access typically allow runtime systems to perform various data movement, data storage, and/or synchronization optimizations.